import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

import RtcIndex from "../rtcComps/index"
import RecDemo from "../rtcComps/rtcDemo"
import RtcPeer from "../rtcComps/rtcpeer.vue"
import KmsIndex from "../rtcComps/kmsIndex.vue"
import KmsModel from "../rtcComps/kmsModel.vue"

Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'Home',
        component: RtcIndex
    }, {
        path: '/rtc',
        name: 'RecDemo',
        component: RecDemo
    }, {
        path: '/kms',
        name: 'KmsIndex',
        component: KmsIndex
    }, {
        path: '/peer',
        name: 'RtcPeer',
        component: RtcPeer
    }, {
        path: '/kmsModel',
        name: 'kmsModel',
        component: KmsModel
    },
    {
        path: '/about',
        name: 'About',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/About.vue')
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router